Copies a file.
ファイルをコピーします。
FileCopy TextFrom As String, TextTo As String
FileCopy TextFrom As String, TextTo As String
TextFrom: Any string expression that specifies the name of the file that you want to copy. The expression can contain optional path and drive information. If you want, you can enter a path in URL notation.
TextFrom: コピーするファイル名を指定する文字列表式。 この表式には、オプションでパスやドライブ情報を収めることもできます。 必要であれば、パス指定に URL 指定を用いることもできます。
TextTo: Any string expression that specifies where you want to copy the source file to. The expression can contain the destination drive, the path, and file name, or the path in URL notation.
TextTo: ソースファイルのコピー先を指定する文字列表式。 この表式にはコピー先のドライブ、パス、ファイル名を含めるか、またはそれらをURLで 指定できます。
![]() | You can only use the FileCopy statement to copy files that are not opened.
FileCopy ステートメントでコピーできるのは、オープンされていないファイルだけです。 |
Sub ExampleFilecopy
Sub ExampleFilecopy
Filecopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"
Filecopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"
end sub
end sub